<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<body>

<ui:composition template="/template/template.xhtml">

	<ui:define name="title">Salvar Equipamento</ui:define>

	<ui:define name="body">
		<h:form id="form">
			<h:panelGrid columns="3" width="50%">
				
				<h:panelGrid columns="1" >
					<h:outputLabel for="serial" id="serialLabel" value="Serial:"></h:outputLabel>
					<h:inputText id="serial"
						value="#{crudEquipameno.equipamentoTO.serial}" styleClass="tamanhoMedio" disabled="true"/>
				</h:panelGrid>
				
				<h:panelGrid columns="1">
					<h:outputLabel for="versao" id="versaoLabel" value="Versao: "></h:outputLabel>
					<h:selectOneMenu id="versao"
						value="#{crudEquipameno.equipamentoTO.versaoTO}"
						styleClass="tamanhoMedio" converter="simpleConvert">
						<f:selectItems value="#{crudEquipameno.listaVersoes}"
							var="o" itemLabel="#{o.versao}" itemValue="#{o}"/>
					</h:selectOneMenu>
				</h:panelGrid>
				
				<h:panelGrid columns="2">
					<h:panelGroup columns="1">
						<h:outputLabel for="ddd" id="dddLabel" value="ddd:"></h:outputLabel>
						<h:inputText id="ddd"
							value="#{crudEquipameno.equipamentoTO.ddd}" style="width:30px;"
							required="true" requiredMessage="DDD e obrigatorio." />
					</h:panelGroup>
	
					<h:panelGroup columns="1">
						<h:outputLabel for="telefone" id="telefoneLabel" value="Telefone: "></h:outputLabel>
						<h:inputText id="telefone"
							value="#{crudEquipameno.equipamentoTO.telefone}" styleClass="tamanhoPequeno"
							required="true" requiredMessage="Telefone e obrigatorio." />
					</h:panelGroup>
				</h:panelGrid>

				<h:panelGrid columns="1">
					<h:outputLabel for="pin" id="pinLabel" value="PIN: "></h:outputLabel>
					<h:inputText id="pin"
						styleClass="tamanhoMedio" value="#{crudEquipameno.equipamentoTO.pin}"
						required="true" requiredMessage="PIN e obrigatorio." />
				</h:panelGrid>
				
				<h:panelGrid columns="1">
					<h:outputLabel for="puk" id="pukLabel" value="PUK: "></h:outputLabel>
					<h:inputText id="puk"
						styleClass="tamanhoMedio" value="#{crudEquipameno.equipamentoTO.puk}"
						required="true" requiredMessage="PUK e obrigatorio." />
				</h:panelGrid>
				
				<h:panelGrid columns="1">
					<h:outputLabel for="status" id="statusLabel" value="Status:"></h:outputLabel>
					<h:selectOneMenu id="status" value="#{crudEquipameno.statusValue}" styleClass="tamanhoMedio">
						<f:selectItems value="#{crudEquipameno.listaStatus}" />
					</h:selectOneMenu>
				</h:panelGrid>
				
				<h:commandButton value="salvar" action="#{crudEquipameno.salvar}" styleClass="button"/>

			</h:panelGrid>
		</h:form>
	</ui:define>

</ui:composition>

</body>
</html>